<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: MovingMobilityBase Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00147.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">MovingMobilityBase Class Reference<div class="ingroups"><a class="el" href="a00513.html">mobility - modules handling the mobility of the hosts</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="MovingMobilityBase" --><!-- doxytag: inherits="MobilityBase" -->
<p>Base class for moving mobility modules. Periodically emits a signal with the current mobility state.  
 <a href="a00147.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00365_source.html">MovingMobilityBase.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MovingMobilityBase:</div>
<div class="dyncontent">
<div class="center"><img src="a00884.png" border="0" usemap="#MovingMobilityBase_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for MovingMobilityBase:</div>
<div class="dyncontent">
<div class="center"><img src="a00885.png" border="0" usemap="#MovingMobilityBase_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00886.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afaf91f3d0f1f7866d2e0928360d77a1b"></a><!-- doxytag: member="MovingMobilityBase::getCurrentPosition" ref="afaf91f3d0f1f7866d2e0928360d77a1b" args="()" -->
virtual <a class="el" href="a00065.html">Coord</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#afaf91f3d0f1f7866d2e0928360d77a1b">getCurrentPosition</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current position at the current simulation time. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8335090d6aa06c8f5c1ec2330bfe39de"></a><!-- doxytag: member="MovingMobilityBase::getCurrentSpeed" ref="a8335090d6aa06c8f5c1ec2330bfe39de" args="()" -->
virtual <a class="el" href="a00065.html">Coord</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a8335090d6aa06c8f5c1ec2330bfe39de">getCurrentSpeed</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current speed at the current simulation time. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86cf9ed4e4d9cf256d8f4ef1a1c34288"></a><!-- doxytag: member="MovingMobilityBase::numInitStages" ref="a86cf9ed4e4d9cf256d8f4ef1a1c34288" args="() const " -->
virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a86cf9ed4e4d9cf256d8f4ef1a1c34288">numInitStages</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the required number of initialize stages. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42b5578a418c86489c79cb765f1ffd4f"></a><!-- doxytag: member="MovingMobilityBase::initialize" ref="a42b5578a418c86489c79cb765f1ffd4f" args="(int stage)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a42b5578a418c86489c79cb765f1ffd4f">initialize</a> (int stage)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes mobility model parameters in 4 stages. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ed9ae1fa1243a9d82e0f52007fe6d54"></a><!-- doxytag: member="MovingMobilityBase::handleSelfMessage" ref="a9ed9ae1fa1243a9d82e0f52007fe6d54" args="(cMessage *message)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a9ed9ae1fa1243a9d82e0f52007fe6d54">handleSelfMessage</a> (cMessage *message)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Called upon arrival of a self messages, subclasses must override. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94a118dd8f1d68588faf880aaf66ac5c"></a><!-- doxytag: member="MovingMobilityBase::scheduleUpdate" ref="a94a118dd8f1d68588faf880aaf66ac5c" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a94a118dd8f1d68588faf880aaf66ac5c">scheduleUpdate</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Schedules the move timer that will update the mobility state. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a586e0325da671e63adfc9f3b5321d559"></a><!-- doxytag: member="MovingMobilityBase::moveAndUpdate" ref="a586e0325da671e63adfc9f3b5321d559" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a586e0325da671e63adfc9f3b5321d559">moveAndUpdate</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves and notifies listeners. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a9d3b4a926b2dd8fa59de6600522ae19d">move</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves according to the mobility model to the current simulation time.  <a href="#a9d3b4a926b2dd8fa59de6600522ae19d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7cc4d6a4ccc8b0b5b52a3ae04763fb68"></a><!-- doxytag: member="MovingMobilityBase::moveTimer" ref="a7cc4d6a4ccc8b0b5b52a3ae04763fb68" args="" -->
cMessage *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a7cc4d6a4ccc8b0b5b52a3ae04763fb68">moveTimer</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The message used for mobility state changes. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#aa33003dc3ef24ff2f08ab10f713025be">updateInterval</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The simulation time interval used to regularly signal mobility state changes.  <a href="#aa33003dc3ef24ff2f08ab10f713025be"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a6c780988c5edd64fc81a7a4d342b8118">stationary</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A mobility model may decide to become stationary at any time.  <a href="#a6c780988c5edd64fc81a7a4d342b8118"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1188feab18688c3d31483ac667bbd5f"></a><!-- doxytag: member="MovingMobilityBase::lastSpeed" ref="ab1188feab18688c3d31483ac667bbd5f" args="" -->
<a class="el" href="a00065.html">Coord</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#ab1188feab18688c3d31483ac667bbd5f">lastSpeed</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The last speed that was reported at lastUpdate. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60d88e6d9264df81f40eabb644e5c402"></a><!-- doxytag: member="MovingMobilityBase::lastUpdate" ref="a60d88e6d9264df81f40eabb644e5c402" args="" -->
simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a60d88e6d9264df81f40eabb644e5c402">lastUpdate</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The simulation time when the mobility state was last updated. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a5c6e51e3ac03c935482057ce7726eb3d">nextChange</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The next simulation time when the mobility module needs to update its internal state.  <a href="#a5c6e51e3ac03c935482057ce7726eb3d"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Base class for moving mobility modules. Periodically emits a signal with the current mobility state. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Levente Meszaros </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9d3b4a926b2dd8fa59de6600522ae19d"></a><!-- doxytag: member="MovingMobilityBase::move" ref="a9d3b4a926b2dd8fa59de6600522ae19d" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MovingMobilityBase::move </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Moves according to the mobility model to the current simulation time. </p>
<p>Subclasses must override and update lastPosition, lastSpeed, lastUpdate, nextChange and other state according to the mobility model. </p>

<p>Implemented in <a class="el" href="a00167.html#abf629f4b68228314604addd5fc911297">Ns2MotionMobility</a>, <a class="el" href="a00220.html#aca27a0cc6248eaad99c566d49c2ffc5e">TurtleMobility</a>, <a class="el" href="a00046.html#aaf63e4200e8f9b401b527b8e73717b03">CircleMobility</a>, <a class="el" href="a00187.html#a32ecffdbc60f4af16a23acd84b8aab90">RectangleMobility</a>, <a class="el" href="a00010.html#ac6f3a0cb6a8f7b0c09d1e9cc01e06c22">ANSimMobility</a>, <a class="el" href="a00038.html#abc3f79d60f65eb5af771ed44dcaa3bbd">BonnMotionMobility</a>, <a class="el" href="a00139.html#ac3c5feac17ea67c81db48f49c5c67505">MassMobility</a>, <a class="el" href="a00045.html#a7ce18637a71e90d97461f4cecb935adc">ChiangMobility</a>, <a class="el" href="a00096.html#a1f8f319a35f38b3578e22151c380de67">GaussMarkovMobility</a>, <a class="el" href="a00124.html#af16aa2d19ba0c40366542d48a0605dcc">LineSegmentsMobilityBase</a>, <a class="el" href="a00186.html#a7775f9c1fad0e50420c7dd16a4738562">RandomWPMobility</a>, and <a class="el" href="a00122.html#a144bed62ee46f5204c47fd84658e45d7">LinearMobility</a>.</p>

<p>Referenced by <a class="el" href="a00147.html#a586e0325da671e63adfc9f3b5321d559">moveAndUpdate()</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a5c6e51e3ac03c935482057ce7726eb3d"></a><!-- doxytag: member="MovingMobilityBase::nextChange" ref="a5c6e51e3ac03c935482057ce7726eb3d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">simtime_t <a class="el" href="a00147.html#a5c6e51e3ac03c935482057ce7726eb3d">MovingMobilityBase::nextChange</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The next simulation time when the mobility module needs to update its internal state. </p>
<p>The -1 value turns off sending a self message for the next mobility state change. </p>

<p>Referenced by <a class="el" href="a00220.html#adf8a33f548f1f30804b8e8399b7f0dfd">TurtleMobility::executeStatement()</a>, <a class="el" href="a00010.html#a39577e65116b0ec8f05c118710b5445b">ANSimMobility::extractDataFrom()</a>, <a class="el" href="a00124.html#a93df492d182199a12256c150f61da90b">LineSegmentsMobilityBase::initialize()</a>, <a class="el" href="a00220.html#ae89831a398a71d6472c26f336887f754">TurtleMobility::initializePosition()</a>, <a class="el" href="a00124.html#af16aa2d19ba0c40366542d48a0605dcc">LineSegmentsMobilityBase::move()</a>, <a class="el" href="a00147.html#a586e0325da671e63adfc9f3b5321d559">moveAndUpdate()</a>, <a class="el" href="a00220.html#a6301ae69ac2657ffb813f422885b4323">TurtleMobility::resumeScript()</a>, <a class="el" href="a00147.html#a94a118dd8f1d68588faf880aaf66ac5c">scheduleUpdate()</a>, <a class="el" href="a00186.html#aec3111a2fa5e5bed3737d1067d2b01b2">RandomWPMobility::setTargetPosition()</a>, <a class="el" href="a00062.html#ae1e2838d4bae6d0821054a5e6c2abb4a">ConstSpeedMobility::setTargetPosition()</a>, <a class="el" href="a00045.html#ae5117103fd3d0afe32e9e6267b2668a0">ChiangMobility::setTargetPosition()</a>, <a class="el" href="a00038.html#a329cf4ceedc6b5bebc1714889c4924e5">BonnMotionMobility::setTargetPosition()</a>, <a class="el" href="a00216.html#ab7c5cbcfc3f84b8b0ffa9b16e97c0c28">TractorMobility::setTargetPosition()</a>, <a class="el" href="a00010.html#a297696a4c49833d685f3a79775079663">ANSimMobility::setTargetPosition()</a>, <a class="el" href="a00096.html#a9e8712b223c9cc98176582090f2ba968">GaussMarkovMobility::setTargetPosition()</a>, <a class="el" href="a00139.html#a8992eab0d8f53b6261b0edd5b4d79655">MassMobility::setTargetPosition()</a>, <a class="el" href="a00167.html#aeacfe0bd2e3ecd3d056fc68bdcdc9ecf">Ns2MotionMobility::setTargetPosition()</a>, <a class="el" href="a00143.html#a7a181399edf633b6598fad60cf2fbce7">MoBANLocal::setTargetPosition()</a>, and <a class="el" href="a00142.html#a9f2559857f8062a663d8672187a18a1a">MoBANCoordinator::setTargetPosition()</a>.</p>

</div>
</div>
<a class="anchor" id="a6c780988c5edd64fc81a7a4d342b8118"></a><!-- doxytag: member="MovingMobilityBase::stationary" ref="a6c780988c5edd64fc81a7a4d342b8118" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="a00147.html#a6c780988c5edd64fc81a7a4d342b8118">MovingMobilityBase::stationary</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A mobility model may decide to become stationary at any time. </p>
<p>The true value disables sending self messages. </p>

<p>Referenced by <a class="el" href="a00045.html#a58c485d8f5ec8acfd2b69570f956cd12">ChiangMobility::initialize()</a>, <a class="el" href="a00186.html#ae3269ca71d4aa02a51fc7933782737e0">RandomWPMobility::initialize()</a>, <a class="el" href="a00122.html#a90721c1e167c816383c1f9a13ceb81cc">LinearMobility::initialize()</a>, <a class="el" href="a00062.html#a526493cba2a06a0c1df36bc1f190ac1c">ConstSpeedMobility::initialize()</a>, <a class="el" href="a00124.html#a93df492d182199a12256c150f61da90b">LineSegmentsMobilityBase::initialize()</a>, <a class="el" href="a00096.html#ab11b6af164abb0784b0e637bec8c81ee">GaussMarkovMobility::initialize()</a>, <a class="el" href="a00187.html#a7042d73fe8ec8419352e5e0e8d188e28">RectangleMobility::initialize()</a>, <a class="el" href="a00046.html#a6ab5b8976743a51b6d06dd98ce1b402e">CircleMobility::initialize()</a>, <a class="el" href="a00122.html#a144bed62ee46f5204c47fd84658e45d7">LinearMobility::move()</a>, <a class="el" href="a00220.html#a6301ae69ac2657ffb813f422885b4323">TurtleMobility::resumeScript()</a>, <a class="el" href="a00147.html#a94a118dd8f1d68588faf880aaf66ac5c">scheduleUpdate()</a>, <a class="el" href="a00038.html#a329cf4ceedc6b5bebc1714889c4924e5">BonnMotionMobility::setTargetPosition()</a>, <a class="el" href="a00010.html#a297696a4c49833d685f3a79775079663">ANSimMobility::setTargetPosition()</a>, and <a class="el" href="a00167.html#aeacfe0bd2e3ecd3d056fc68bdcdc9ecf">Ns2MotionMobility::setTargetPosition()</a>.</p>

</div>
</div>
<a class="anchor" id="aa33003dc3ef24ff2f08ab10f713025be"></a><!-- doxytag: member="MovingMobilityBase::updateInterval" ref="aa33003dc3ef24ff2f08ab10f713025be" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">simtime_t <a class="el" href="a00147.html#aa33003dc3ef24ff2f08ab10f713025be">MovingMobilityBase::updateInterval</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The simulation time interval used to regularly signal mobility state changes. </p>
<p>The 0 value turns off the signal. </p>

<p>Referenced by <a class="el" href="a00147.html#a42b5578a418c86489c79cb765f1ffd4f">initialize()</a>, <a class="el" href="a00147.html#a94a118dd8f1d68588faf880aaf66ac5c">scheduleUpdate()</a>, and <a class="el" href="a00096.html#a9e8712b223c9cc98176582090f2ba968">GaussMarkovMobility::setTargetPosition()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/inet_stub/mobility/models/<a class="el" href="a00365_source.html">MovingMobilityBase.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/inet_stub/mobility/models/MovingMobilityBase.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00147.html">MovingMobilityBase</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
